import pydot

def disGraph(data, id):
    graph = pydot.Dot(graph_type = 'digraph')
    for i in data:
        edge = pydot.Edge(str(i.source), str(i.target))
        graph.add_edge(edge)
    svg_path = r'svgdata/' + str(id) + '_pruned.svg'
    graph.write_svg(svg_path)
    print "dot file generated"
